home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / fsattach / fsattach.man < prev    next >
Encoding:
Text File  |  1991-01-13  |  7.4 KB  |  204 lines

  1. '\" Copyright 1989 Regents of the University of California
  2. '\" Permission to use, copy, modify, and distribute this
  3. '\" documentation for any purpose and without fee is hereby
  4. '\" granted, provided that this notice appears in all copies.
  5. '\" The University of California makes no representations about
  6. '\" the suitability of this material for any purpose.  It is
  7. '\" provided "as is" without express or implied warranty.
  8. '\" 
  9. '\" $Header: /sprite/src/admin/fsattach/RCS/fsattach.man,v 1.5 91/01/12 16:49:27 jhh Exp $ SPRITE (Berkeley)
  10. '/" 
  11. .so \*(]ltmac.sprite
  12. .HS FSATTACH cmds
  13. .BS
  14. '\" Note:  do not modify the .SH NAME line immediately below!
  15. .SH NAME
  16. fsattach \- Check disks and export prefixes 
  17. .SH SYNOPSIS
  18. \fBfsattach\fR [\fIoptions\fR]
  19. .SH OPTIONS
  20. .IP "\fB\-m \fIfile\fR" 15
  21. Read mount table from \fIfile\fR.
  22. .IP "\fB\-W\fR" 15
  23. Check disks, but do not write changes.
  24. .IP "\fB\-f\fR" 15
  25. Don't check disks (fastboot).
  26. .IP "\fB\-s\fR" 15
  27. Ignore group information found in mount table and run \fBfscheck\fR 
  28. sequentially.
  29. .IP "\fB\-v\fR" 15
  30. Have both \fBfsattach\fR and \fBfscheck\fR  output verbose information
  31. while running.
  32. .IP "\fB\-n\fR" 15
  33. Don't attach disks or export prefixes.
  34. .IP "\fB\-p\fR" 15
  35. Print out actions but don't execute them.
  36. .IP "\fB\-help\fR" 15
  37. Print a summary of the command-line options and exit.
  38. .IP "\fB\-d \fIdeviceDirectory\fR" 15
  39. Specifies the directory containing the device files.
  40. The default is "/dev".
  41. .IP "\fB\-k\fR" 15
  42. Produce debugging output.
  43. .IP "\fB\-i \fIspriteID\fR" 15
  44. Causes prefixes that this machine will export to be preloaded into the
  45. prefix table. 
  46. This prevents the machine from broadcasting for its own prefixes while
  47. the disks are being checked.
  48. .IP "\fB\-j \fImaxJobs\fR" 15
  49. The default behavior is for \fBfsattach\fR to run as many \fBfscheck\fR
  50. jobs in parallel as it can.
  51. The parallelism is limited by the \fIgroup\fR of each device (see below),
  52. and the \fB\-j\fR flag.
  53. If this flag is used then at most \fImaxJobs\fR \fIfscheck\fRs will
  54. be run at a time.
  55. .IP "\fB\-fscheck \fIfscheckProg\fR" 15
  56. Use this to specify an alternative fscheck program, i.e. when testing
  57. a new fscheck.
  58. .IP "\fB\-c\fR 15
  59. Conditionally check the disks.  If the disks were just checked by \fIfscheck\fR
  60. and we are now rebooting, then we don't have to check again.  If the \fB\-c\fR
  61. flag is present then the disks won't be rechecked. 
  62. .BE
  63.  
  64. .SH DESCRIPTION
  65. .PP
  66. \fBFsattach\fR is used during system boot to check the disks for 
  67. inconsistencies and
  68. to export prefixes.
  69. The input to \fBfsattach\fR is a mount table, usually in 
  70. \fI/hosts/$HOST/mount\fR.
  71. The location of the mount table is specified by the
  72. \fB\-m\fR option.
  73. \fBFsattach\fR uses the pass information in the mount table to create child
  74. processes that check
  75. the disk partitions using \fBfscheck\fR.
  76. The output from \fBfscheck\fR is appended to a file with the same name as 
  77. the device and the suffix ".fsc".
  78. If \fBfscheck\fR completes normally, 
  79. then the filesystem is mounted and its prefix exported.
  80. .SH MOUNT TABLE 
  81. The mount table contains information on checking the disks and on exporting
  82. prefixes.
  83. Each line in the table consists of a command and its arguments. 
  84. Blank lines and lines that begin with '#' are ignored.
  85. The \fBAttach\fR command is used to check a disk partition and to attach the 
  86. partition to the file system. 
  87. \fBAttach\fR commands have the following format:
  88. .sp
  89. .in 5
  90. \fBAttach\fR \fIprefix\fR \fIdevice\fR \fIgroup\fR \fIscope\fR \fIaccess\fR
  91. .in 0
  92. .LP
  93. \fIPrefix\fR is the prefix under which to mount the partition. 
  94. .LP
  95. The \fIdevice\fR is the
  96. device on which to run fscheck and to attach.
  97. .LP
  98. The \fIgroup\fR parameter is used to determine the parallelism in checking the
  99. disks. \fBFscheck\fR is a very IO constrained application. 
  100. Most of the execution time is spent waiting for the disk. 
  101. If the system has more than one disk the overall run time of \fBfsattach\fR can
  102. be decreased by checking different disks at the same time.
  103. \fIFsattach\fR will run jobs in parallel if possible.
  104. Any partitions that are in the same group  will NOT be checked
  105. in parallel.
  106. A group name is any sequence of characters and is case sensitive.
  107. The group name "root" has special significance.
  108. It is used as the group of the root partition.
  109. This partition is checked before all other partitions, 
  110. and the server may have to reboot if an error is found in this partition.
  111. .LP
  112. The \fIscope\fR can be either local or export. 
  113. Partitions with local scope are attached only for the local machine, 
  114. whereas partitions with export scope are attached and exported under the
  115. given prefix.
  116. The prefix corresponding to the root partition (usually /bootTmp) is
  117. attached during system boot and is not reattached by \fBfsattach\fR.
  118. For this partition the scope parameter does not have any effect.
  119. .LP
  120. The \fIaccess\fR is used to set the access permissions of the prefix. 
  121. If the access is "r" then the prefix is read only. 
  122. If the access is "rw" then the prefix is can be both read and written.
  123. The access parameter has no effect if the partition is the root partition.
  124. .PP
  125. The \fBExport\fR command is used to export a prefix under a different name.
  126. \fBExport\fR commands have the following format:
  127. .sp
  128. .in 5
  129. \fBExport\fR \fIprefix\fR \fIlocalPath\fR 
  130. .in 0
  131. .LP
  132. \fIPrefix\fR is the name of the prefix to be exported.
  133. .LP
  134. \fILocalPath\fR is the name of a path that is to be exported as \fIprefix\fR.
  135. .PP
  136. All other non-comment lines are interpreted as containing arguments to
  137. \fBfscheck\fR.
  138. The format of these lines is:
  139. .sp
  140. .in 5
  141. \fIdeviceName\fR \fI[arguments]\fR
  142. .in 0
  143. .LP
  144. \fIDeviceName\fR is the name of the device for which \fBfscheck\fR is to use the
  145. \fIarguments\fR. A device name of \fBall\fR will cause \fBfscheck\fR to use the 
  146. arguments for all devices. Any number of arguments can follow the device
  147. name, 
  148. as long as they fit on a single line. 
  149. The same device name can appear on any number of lines.
  150. .PP
  151. The following is a sample mount table. The root partition is 
  152. \fI/dev/rsd0a\fR and
  153. it is exported under the prefix \fI/t1\fR. 
  154. \fI/t2\fR is another small partition on
  155. the same disk. 
  156. \fI/b\fR is a large partition on the disk, and \fI/a\fR is a large partition
  157. that is an entire second disk.
  158. .KS
  159. .DS 
  160. #<Command>      <Prefix>        <Device/Path> <Group>   <Scope>       <Access>
  161.  
  162. Attach          /t1            /dev/rsd0a     root     export          rw
  163. Attach          /t2             /dev/rsd0b      A       export          rw
  164. Attach          /b              /dev/rsd0g      A       export          rw
  165. Attach          /a              /dev/rsd1c      B       export          rw
  166.  
  167. Export        /foo        /t2
  168.  
  169. #<Device>       <Arguments to fscheck>
  170.  
  171. all             -readBlock 10
  172. /dev/rsd0b      -outputFile foo
  173. .DE
  174. .KE
  175. .SH RETURN CODES
  176. \fBFsattach\fR returns one of the following codes upon exit.
  177. .IP 0
  178. No error.
  179. .IP 1
  180. An error was found in the root partition. Reboot the system. See \fBfscheck\fR
  181. for details.
  182. .IP 2
  183. A hard error occurred. There was some problem in either \fBfsattach\fR, 
  184. \fBfscheck\fR,
  185. or \fBprefix\fR that prevented \fBfsattach\fR from completing normally.
  186. .IP 3 
  187. \fBFscheck\fR returned a soft error indication. See \fBfscheck\fR for details.
  188. .IP 4
  189. An error was found in the root partition, but the number of consecutive
  190. times that \fBfscheck\fR was run and an error found exceeds the limit.
  191. .KS
  192. .SH FILES
  193. .DS L
  194. .nf
  195. /boot/cmds/fscheck            command to check disks
  196. /hosts/$HOST/*.fsc            output from fscheck
  197. /bootTmp/.fscheck.out            temporary output from fscheck
  198. .DE
  199. .KE
  200. .fi
  201. .SH KEYWORDS
  202. fsattach, fscheck, prefix, mount, disk, partition, crash, attach, boot 
  203.  
  204.